include $(CLEAR_VARS)

LOCAL_C_INCLUDES := \
    $(MY_MUPDF_HOME)/thirdparty/jbig2dec \
    $(MY_MUPDF_HOME)/thirdparty/openjpeg-1.5.0-patched/libopenjpeg \
    $(MY_MUPDF_HOME)/thirdparty/jpeg-9 \
    $(MY_MUPDF_HOME)/thirdparty/zlib-1.2.7 \
    $(MY_MUPDF_HOME)/thirdparty/freetype-2.4.10/include \
    $(MY_MUPDF_HOME)/scripts

LOCAL_CFLAGS := \
    -DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON -DHAVE_STDINT_H \
    '-DFT_CONFIG_MODULES_H="slimftmodules.h"' \
    '-DFT_CONFIG_OPTIONS_H="slimftoptions.h"'

LOCAL_MODULE := mupdfthirdparty

LOCAL_PATH := $(MY_MUPDF_HOME)/thirdparty

LOCAL_SRC_FILES := \
    jbig2dec/jbig2.c \
    jbig2dec/jbig2_arith.c \
    jbig2dec/jbig2_arith_iaid.c \
    jbig2dec/jbig2_arith_int.c \
    jbig2dec/jbig2_generic.c \
    jbig2dec/jbig2_halftone.c \
    jbig2dec/jbig2_huffman.c \
    jbig2dec/jbig2_image.c \
    jbig2dec/jbig2_metadata.c \
    jbig2dec/jbig2_mmr.c \
    jbig2dec/jbig2_page.c \
    jbig2dec/jbig2_refinement.c \
    jbig2dec/jbig2_segment.c \
    jbig2dec/jbig2_symbol_dict.c \
    jbig2dec/jbig2_text.c \
    openjpeg-1.5.0-patched/libopenjpeg/bio.c \
    openjpeg-1.5.0-patched/libopenjpeg/cidx_manager.c \
    openjpeg-1.5.0-patched/libopenjpeg/cio.c \
    openjpeg-1.5.0-patched/libopenjpeg/dwt.c \
    openjpeg-1.5.0-patched/libopenjpeg/event.c \
    openjpeg-1.5.0-patched/libopenjpeg/image.c \
    openjpeg-1.5.0-patched/libopenjpeg/j2k.c \
    openjpeg-1.5.0-patched/libopenjpeg/j2k_lib.c \
    openjpeg-1.5.0-patched/libopenjpeg/jp2.c \
    openjpeg-1.5.0-patched/libopenjpeg/jpt.c \
    openjpeg-1.5.0-patched/libopenjpeg/mct.c \
    openjpeg-1.5.0-patched/libopenjpeg/mqc.c \
    openjpeg-1.5.0-patched/libopenjpeg/openjpeg.c \
    openjpeg-1.5.0-patched/libopenjpeg/phix_manager.c \
    openjpeg-1.5.0-patched/libopenjpeg/pi.c \
    openjpeg-1.5.0-patched/libopenjpeg/ppix_manager.c \
    openjpeg-1.5.0-patched/libopenjpeg/raw.c \
    openjpeg-1.5.0-patched/libopenjpeg/t1.c \
    openjpeg-1.5.0-patched/libopenjpeg/t2.c \
    openjpeg-1.5.0-patched/libopenjpeg/tcd.c \
    openjpeg-1.5.0-patched/libopenjpeg/tgt.c \
    openjpeg-1.5.0-patched/libopenjpeg/thix_manager.c \
    openjpeg-1.5.0-patched/libopenjpeg/tpix_manager.c \
    jpeg-9/jaricom.c \
    jpeg-9/jcomapi.c \
    jpeg-9/jdapimin.c \
    jpeg-9/jdapistd.c \
    jpeg-9/jdarith.c \
    jpeg-9/jdatadst.c \
    jpeg-9/jdatasrc.c \
    jpeg-9/jdcoefct.c \
    jpeg-9/jdcolor.c \
    jpeg-9/jddctmgr.c \
    jpeg-9/jdhuff.c \
    jpeg-9/jdinput.c \
    jpeg-9/jdmainct.c \
    jpeg-9/jdmarker.c \
    jpeg-9/jdmaster.c \
    jpeg-9/jdmerge.c \
    jpeg-9/jdpostct.c \
    jpeg-9/jdsample.c \
    jpeg-9/jdtrans.c \
    jpeg-9/jerror.c \
    jpeg-9/jfdctflt.c \
    jpeg-9/jfdctfst.c \
    jpeg-9/jfdctint.c \
    jpeg-9/jidctflt.c \
    jpeg-9/jidctfst.c \
    jpeg-9/jidctint.c \
    jpeg-9/jmemmgr.c \
    jpeg-9/jmemnobs.c \
    jpeg-9/jquant1.c \
    jpeg-9/jquant2.c \
    jpeg-9/jutils.c \
    zlib-1.2.7/adler32.c \
    zlib-1.2.7/compress.c \
    zlib-1.2.7/crc32.c \
    zlib-1.2.7/deflate.c \
    zlib-1.2.7/inffast.c \
    zlib-1.2.7/inflate.c \
    zlib-1.2.7/inftrees.c \
    zlib-1.2.7/trees.c \
    zlib-1.2.7/uncompr.c \
    zlib-1.2.7/zutil.c \
    freetype-2.4.10/src/base/ftbase.c \
    freetype-2.4.10/src/base/ftbbox.c \
    freetype-2.4.10/src/base/ftbitmap.c \
    freetype-2.4.10/src/base/ftgasp.c \
    freetype-2.4.10/src/base/ftglyph.c \
    freetype-2.4.10/src/base/ftinit.c \
    freetype-2.4.10/src/base/ftstroke.c \
    freetype-2.4.10/src/base/ftsynth.c \
    freetype-2.4.10/src/base/ftsystem.c \
    freetype-2.4.10/src/base/fttype1.c \
    freetype-2.4.10/src/base/ftxf86.c \
    freetype-2.4.10/src/cff/cff.c \
    freetype-2.4.10/src/cid/type1cid.c \
    freetype-2.4.10/src/psaux/psaux.c \
    freetype-2.4.10/src/pshinter/pshinter.c \
    freetype-2.4.10/src/psnames/psnames.c \
    freetype-2.4.10/src/raster/raster.c \
    freetype-2.4.10/src/smooth/smooth.c \
    freetype-2.4.10/src/sfnt/sfnt.c \
    freetype-2.4.10/src/truetype/truetype.c \
    freetype-2.4.10/src/type1/type1.c

include $(BUILD_STATIC_LIBRARY)
